package com.cyk.comicforumjava.demos.mapper;

import com.cyk.comicforumjava.demos.enits.Comment;
import com.cyk.comicforumjava.demos.enits.Post;
import com.cyk.comicforumjava.demos.enits.Support;
import com.cyk.comicforumjava.demos.vo.PostVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PostMapper {
    PostVo getPost(String postId);


    Support getSupport(Support support);

    void newSupport(Support support);

    void delSupport(Support support);

    Comment selectComment(String postId);

    void updateComment(Comment comment);

    void updatePost(Post post);

    void newComment(Comment comment);

    void backPost(Post post);

    List<Post> getBackPostList(String postId);

    List<Post> getPostList(String sectionId);

    void addPost(Post post);

    List<Post> getOrderPostList(String sectionId);

    List<Post> getUserPostList(Long id);

    List<Post> selectAll( String postContent);

    void deletePost(String id);

    List<Comment> selectAllComment(String commentContent);

    void deleteComment(String commentId);
}
